﻿using System;
using System.Runtime.InteropServices;

namespace WinAPI
{
    public class MarshalException : Exception
    {
        private int errorCode;
        public MarshalException()
            : base(Marshal.GetLastWin32Error().ToString())
        {
            errorCode = Marshal.GetLastWin32Error();

        }
        public int ErrorCode
        {
            get { return errorCode; }
        }
    }
}
